<template>
	<view style="background-color: #000000;min-height: 100vh;">
		<video
			style="width: 750rpx;height: 100vh;"
			:direction="0"
			:show-fullscreen-btn="false"
			id="myVideo"
			:autoplay="true"
			:loop="true"
			:src="url"
			@fullscreenchange="fullscreenchange"
		></video>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url:null,
				redirectId:null,
				employeeId:null,
			}
		},
		onReady: function () {
			this.videoContext = uni.createVideoContext("myVideo",this);
			this.videoContext.requestFullScreen();
		},
		onLoad(option) {
			this.url=option.videoUrl;
			this.redirectId=option.redirectId;
			this.employeeId=option.employeeId;
		},
		methods: {
			fullscreenchange (e){
				if(!e.detail.fullScreen){
					this.videoContext.stop()
					uni.redirectTo({
						url:"../hisResume?redirectId="+this.redirectId+'&employeeId='+this.employeeId
					});
				}
			},
		}
	}
</script>

<style>

</style>
